#[derive(Debug)]
enum Message {
    Quit,
    Move { x: i32, y: i32 },
    Write(String),
    ChangeColor(i32, i32, i32),
}

impl Message {
    fn call(&self) {
        println!("{:#?}", self);
    }
}

fn main() {
    let a = Message::Quit;
    a.call();

    let b = Message::Move {
        x: 12,
        y: 24,
    };
    b.call();

    let c = Message::Write(String::from("hello"));
    c.call();

    let d = Message::ChangeColor(0xff, 0xff, 0xff);
    d.call();
}
